import 'package:finance_app/src/entities/sales_summary_entity.dart';

salesSummaryEntityFromJson(SalesSummaryEntity data, Map<String, dynamic> json) {
	if (json['open_quotation'] != null) {
		data.openQuotation = json['open_quotation'].toString();
	}
	if (json['unpaid_invoice'] != null) {
		data.unpaidInvoice = json['unpaid_invoice'].toString();
	}
	if (json['overdue_invoice'] != null) {
		data.overdueInvoice = json['overdue_invoice'].toString();
	}
	if (json['accepted_quotation'] != null) {
		data.acceptedQuotation = json['accepted_quotation'].toString();
	}
	if (json['closed_quotation'] != null) {
		data.closedQuotation = json['closed_quotation'].toString();
	}
	if (json['paid_invoice'] != null) {
		data.paidInvoice = json['paid_invoice'].toString();
	}
	return data;
}

Map<String, dynamic> salesSummaryEntityToJson(SalesSummaryEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['open_quotation'] = entity.openQuotation;
	data['unpaid_invoice'] = entity.unpaidInvoice;
	data['overdue_invoice'] = entity.overdueInvoice;
	data['accepted_quotation'] = entity.acceptedQuotation;
	data['closed_quotation'] = entity.closedQuotation;
	data['paid_invoice'] = entity.paidInvoice;
	return data;
}